import Mock from 'mockjs'
// 数据
import homeApi from './mockData/home.js'
import userApi from './mockData/user.js'
// 拦截ajax请求并且发送数据
Mock.mock(/home\/getTableData/,homeApi.getHomeData)

// 拦截用户页面数据请求
Mock.mock(/user\/getUser/,userApi.getUserList)

// 拦截新增用户请求
Mock.mock(/user\/add/,'post',userApi.createUser)
// 拦截编辑用户请求
Mock.mock(/user\/edit/,'post',userApi.updateUser)
// 拦截删除用户请求
Mock.mock(/user\/delete/,'get',userApi.deleteUser)